package com.shop.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.shop.entity.MerchantRole;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * yyt(MerchantRole)表数据库访问层
 *
 * @author makejava
 * @since 2020-11-26 11:03:50
 */
@Mapper
public interface MerchantRoleMapper extends BaseMapper<MerchantRole> {

    @Select("select id,name,sign,description from merchant_role where id = #{id} and is_deleted = 0")
    MerchantRole getRoleById(Integer id);

    @Select("select id,name,sign from merchant_role where is_deleted = 0")
    List<MerchantRole> getRoleList();
}